package fei.zhou.springboot4.business.config.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * 监听Servlet上下文
 *
 * @author zhoufei
 * @class: MyListener
 * @date 2021/1/20  11:00
 * @Verson 1.0 -2021/1/20  11:00
 * @see
 */
public class MyListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("Servlet上下文---->当前web项目启动");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {

        System.out.println("Servlet上下文---->当前web项目销毁");
    }
}